]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Fix small app folder icons when using HIDPI
authorNikita Churaev <lamefun.x0r@gmail.com>
Fri, 5 Jan 2018 23:54:33 +0000 (02:54 +0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 10 Feb 2018 00:40:48 +0000 (00:40 +0000)
While the scale factor is taken into account for app icons, we set
an explicit size when combining the into a folder icon - unless we
take the factor into account, the result will be too small on HiDPI
displays.

https://bugzilla.gnome.org/show_bug.cgi?id=792259

js/ui/appDisplay.js

index c309471a05de222de0bbdafb70aee19f7d0ce41f..3b50928b9d3a738d372112ac7f98d7110879db9a 100644 (file)
@@ -1192,11 +1192,12 @@ var FolderView = new Lang.Class({
                                    style_class: 'app-folder-icon' });
         layout.hookup_style(icon);
         let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
+        let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;
 
         let numItems = this._allItems.length;
         let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL;
         for (let i = 0; i < 4; i++) {
-            let bin = new St.Bin({ width: subSize, height: subSize });
+            let bin = new St.Bin({ width: subSize * scale, height: subSize * scale });
             if (i < numItems)
                 bin.child = this._allItems[i].app.create_icon_texture(subSize);
             layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);